#include <stdio.h>
#include <errno.h>

#include <iostream>

int main(int argc, char** argv) {
  
  FILE *fp = fopen("./test.log", "a+");
  if (fp == NULL) {
    std::cout << "open fail. errno:" << errno << std::endl;
    return -1;
  }
  
  fprintf(fp, "This is testing for fprintf..\n");
  fclose(fp);
  
  return 0;
}